package com.discuss.community.service;

import com.discuss.community.entity.LoginTicket;
import com.discuss.community.entity.User;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.Map;

@Service
public interface UserService {

    User getUserByUserId(int id);

    Map<String,Object> register(User user);

    int activation(int userId, String code);

    Map<String, Object> login(String username, String password, int expiredSeconds);

    void logout(String ticket);

    LoginTicket findLoginTicket(String ticket);

    int updateHeader(int id, String headerUrl);

    void updatePassword(int id, String newPassword);

    User getUserByUserName(String username);

    Collection<? extends GrantedAuthority> getAuthority(int userId);
}
